import Quill from "quill";
import Video from './video'


function size() {

    const sizes = ['12px', '14px', '16px', '18px', '20px', '22px', '24px'];
    let Size = Quill.import('formats/size');
    Size.whitelist = sizes;
    // Size.whitelist = ['0.26rem', '0.31rem', '0.37rem', '0.41rem', '0.47rem', '0.52rem'];
    Quill.register(Size, true);
    return sizes
}

function fonts() {
    const fonts = ['SimSun', 'SimHei', 'Microsoft-YaHei', 'KaiTi', 'FangSong', 'Arial', 'Times-New-Roman', 'sans-serif'];
    let Font = Quill.import('formats/font');
    Font.whitelist = fonts; //将字体加入到白名单 
    Quill.register(Font, true);
    return fonts;
}

function video(){
    return Quill.register(Video, true)
}

export {
    size,
    fonts,
    video
}